from get_user_list import get_user_list
from push import Admin
import sys
from get_rank_html import Weber
from get_user_list import special_list

###### get rank html ########

# url = "https://vjudge.net/contest/363301#rank"

T = Weber("https://vjudge.net/contest/390379#rank")
try:
    res = T.get_rank_html()
    with open("rank.html", "w",encoding="utf-8") as f:
        f.write(str(res))
    print("Rank Html Getted")
except Exception as e:
    print(e)
finally:
    T.driver.quit()


######## end ############

password = "[[npuacm]]"

url = ""

user_list, not_rank_list = get_user_list()

print(user_list)
print(not_rank_list)

# Adminer = Admin(password)

# Adminer.push(user_list[:10], 2, "weekly contest Top 10")

# Adminer.push(user_list[10:], 1, "weekly contest attend")

# Adminer.push(special_list, 1, "Problem maker")

# Adminer.push(not_rank_list, 1, "weekly contest attend")

# Adminer.push(['2018302278'], 0)

# Adminer.push(['2018302278'], 1)


## ADD wsn 1

print("Done")